package com.zxy.zxyrpc.registry;

/**
 * @author zxy
 * @since 2025/5/11
 **/

import java.util.Map;
import java.util.concurrent.ConcurrentHashMap;

/**
 * 本地注册中心
 */
public class LocalRegistry {
    private static final Map<String, Class<?>> map = new ConcurrentHashMap<>();

    public static void register(String serverName, Class<?> implClass) {
        map.put(serverName, implClass);
    }

    public static Class<?> get(String serverName) {
        return map.get(serverName);
    }

    public static void remove(String serverName) {
        map.remove(serverName);
    }
}
